<form id="AddShopUser" method="post" novalidate="novalidate" class="form-inline">
    <div class="row">
        <!--<div class="col-lg-6 col-md-6">
            <div class="form-group">
                <label>姓名 :</label>
                <input class="form-control" id="shopPersonName" type="text" name="shopPersonName" placeholder="姓名" style="width: 160px;"/>
            </div>
        </div>-->
        <div class="col-lg-6 col-md-6">
            <div class="form-group">
                <label>所属店铺 :</label>
                <select class="form-control" id="shopId" name="shopId" style="width: 160px;">
                    <option value="">所属店铺</option>
                </select>
            </div>
        </div>
    </div>
    <div class="row">
    	<div class="col-lg-6 col-md-6">
            <div class="form-group">
                <label>角色 :</label>
                <input class="form-control" id="shopPersonRole" type="text" name="shopPersonRole" placeholder="角色" style="width: 160px;"/>
            </div>
        </div>
        <div class="col-lg-6 col-md-6">
            <div class="form-group">
                <label>电话号码 :</label>
                <input class="form-control" id="shopPersonNumber" type="text" name="shopPersonNumber" placeholder="电话号码"
                       style="width: 160px;"/>
            </div>
        </div>
    </div>
</form>
<script>
    $(function () {
        GetShop();
    })
    //请求列表
    function GetShop() {
        var json = {
            url: GLOBAL.URL + "/shopinfo/list",
            type: 'get',
            data:{"page":1,"limit":110},
            successfn: function (data) {
                SetShopList(data.page.list);
            },
            errorfn: function () {
                //ajaxUpdataTable();
                //$.ligerDialog.warn("系统繁忙，请稍候再试");
            }
        };
        ajaxdata(json);
    }

    //加载商铺列表数据
    function SetShopList(data) {
        var str="<option value=''>所属店铺</option>";
        if (data != null) {
            for (var i = 0; i < data.length; i++) {
                str += "<option value='" + data[i].id + "'>" + data[i].name + "</option>";
            }
        }
        $("#shopId").html(str);
    }
</script>
